package com.zeedev.flyingsaucer.sync.syncadapter;

import android.content.Intent;
import android.os.IBinder;
import roboguice.service.RoboService;

/**
 * User: James
 * Date: 1/8/11
 * Time: 4:51 PM
 */
public class SyncService extends RoboService {

    private static final Object sSyncAdapterLock = new Object();
    private static SyncAdapter sSyncAdapter = null;

    @Override
    public void onCreate() {
        synchronized (sSyncAdapterLock) {
            if (sSyncAdapter == null) {
                sSyncAdapter = new SyncAdapter(getApplicationContext(), true);
            }
        }
    }

    @Override
    public IBinder onBind(Intent intent) {
        return sSyncAdapter.getSyncAdapterBinder();
    }

}
